import { createApp } from 'vue'
import { createPinia } from 'pinia'
import piniaPersist from 'pinia-plugin-persist'
//导入 ElementPlus 组件库
import ElementPlus from  'element-plus'
//导入 ElementPlus 样式文件
import 'element-plus/dist/index.css'
//导入 axios 模块
import axios from 'axios'

import App from './App.vue'

import router from './router'

const pinia = createPinia()
// 为 pinia 启用持久化支持
pinia.use(piniaPersist)

const app = createApp(App)

app.use(pinia)
app.use(router)
//全局启用ElementPlus组件库
app.use(ElementPlus);

//绑定全局属性(将来在任意组件中都可以通过this.axios来使用axios)
app.config.globalProperties.axios = axios

app.mount('#app')
